package com.guomao.filedemos;

import java.io.File;
import java.io.IOException;

public class FileDemoC {


    public static void main(String[] args) throws IOException {


        //createNewFile 创建文件
        File file = new File("D://abc.md");

        if (file.exists()) {
            System.out.println("file exists");
        } else {
            System.out.println("file does not exist");
            boolean flag = file.createNewFile();
            if (flag) {
                System.out.println("file created");
            }
        }
    }
}
